import request from "../request";
import {
    FetchClassListRes, FetchCourseZSDetailRes, FetchCourseZSListRes,
    FetchRDClassListRes, FetchRDCourseDetailRes,
    FetchRDCourseListRes, FetchSKSJListRes,
    FetchZZYClassListRes, ModifyCourseZSInfoRes, ModifyRDCourseInfoRes,
	ResponseRET
} from "../../types/responseTypes";
import {
    CourseZSDetailParams,
    CourseZSListParams,
    KXClassesDataParams, ModifyCourseZSInfoParams, ModifyRDCourseInfoParams,
    RDClassesListParams, RDCourseDetailParams,
    RDCourseListParams,
    ZZYClassesListParams,
	TeacherList
} from "../../types/requestTypes";

/**
 * 获取可选班级列表
 * @param params
 */
export const getClassList = (params: KXClassesDataParams): Promise<FetchClassListRes> => request.post('/restapi/STUA_mbreport_zl/RD_CLASSES_KX_LIST_RET', params, true)


/**
 * 获取可选班级列表
 * @param params
 */
export const getClassListNew = (params: KXClassesDataParams): Promise<FetchClassListRes> => request.post('/restapi/STUA_mbreport_new/RDCLASSES_LIST_ALL', params, true)
/**
 * 查看转专业可选专业课列表
 * @param params
 */
export const getZZYClassList = (params: ZZYClassesListParams): Promise<FetchZZYClassListRes> => request.post('/restapi/STUA_mbreport_new/RD_CLASSES_ZZYKX_LIST', params,true)

/**
 * 查询专业班列表
 * @param params
 */
export const getRDCourseList = (params: RDCourseListParams): Promise<FetchRDCourseListRes> => request.post('/restapi/STUA_mbreport_new/RDCOURSES_LIST', params, true)

/**
 * 查询指定专业班资料
 * @param params
 */
export const getRDCourseDetail = (params: RDCourseDetailParams): Promise<FetchRDCourseDetailRes> => request.post('/restapi/STUA_mbreport_new/RDCOURSES_ID',params,true)

/**
 * 编辑专业班资料
 * @param params
 */
export const doModifyRDCourseInfo = (params: ModifyRDCourseInfoParams): Promise<ModifyRDCourseInfoRes> => request.post('/restapi/STUA_mbreport_new/ET_COURSES', params, true)

/**
 * 查询班级招生资料列表
 * @param params
 */
export const getCourseZSList = (params: CourseZSListParams): Promise<FetchCourseZSListRes> => request.post('/restapi/STUA_mbreport_new/RDCLASSES_LIST', params,true)

/**
 * 查询指定班级招生资料
 * @param params
 */
export const getCourseZSDetail = (params: CourseZSDetailParams): Promise<FetchCourseZSDetailRes> => request.post('/restapi/STUA_mbreport_new/RDCLASSES_ID', params,true)

/**
 * 查看上课时间列表
 * @param userId
 */
export const getSKSJList = (userId: string | number): Promise<FetchSKSJListRes> => request.post('/restapi/STUA_mbreport_new/RDCLASSTIME_LIST', {
    OPERATOR_ID: userId
}, true)

/**
 * 编辑专业班招生资料
 * @param params
 */
export const doModifyCourseZSInfo = (params: ModifyCourseZSInfoParams): Promise<ModifyCourseZSInfoRes> => request.post('/restapi/STUA_mbreport_new/ET_CLASSES',params,true)


/**
 * 获取老师列表
 * @param params
 */
export const getteacherList = (params: TeacherList): Promise<ResponseRET> => request.post('/restapi/STUA_mbreport_new/RDTEACHER_LIST',params,true)
